Cleaning A Test Machine

SoftwareShield System Feature Guide > Testing and Debugging Support > Cleaning A Test Machine

## Cleaning A Test Machine

Understanding how to perform a "clean" is a necessary part of developing licenses. As you develop your licenses and integrate their functionality into your software, you will need to repeatedly test various scenarios and evolutions of your implementation. Much of this unit-testing will be performed on your development machine. See Cleaning A Development Machine for more information.

However, eventually the time will come when you must test your application on test machines (probably with your minimum requirements and a fresh operating system of each type you support).

Even during your final phases of testing, you may find it necessary to clean your test machine. This may be necessary because every time you execute the StartUp function of the ClientProtector, the state of the license will change, Alias Files will be written, the registry may be altered and you may need to "start fresh" on your test machine as though the application had be run for the first time. Normally, you should not plan to do this, but in the rare case it is necessary - you should know what is involved.

You should strive to do as much testing and debugging on your development machine as is necessary to be confident the licensing functionality is satisfied before deploying to test-machines, since these machines will not give you the support of having the SoftwareShield System DRM Kit installed.

### Disk Imaging

Ideally, we recommend that you use a disk imaging (cloning) software package to create images of each of the installed operating systems you intend to support on your test machine(s) and simply restore them from these images when needed. The process usually takes only a couple of minutes when properly set-up and you can essentially switch an entire installed OS, all of its installed programs and settings very rapidly. Reformatting the hard drive, reinstalling everything and making configuration settings can take many hours. Restoring from an image usually takes about three minutes.

Naturally, this provides the major benefit that when you restore a disk or partition image, your software is guaranteed to be running on a "fresh, clean, bare-bones" OS with all the installed programs and settings you have carefully set-up, allowing you to be sure you don't fall into the all-too-common trap of ".. that's weird... it worked on my development machine...". This should be a standard practice for your test process - regardless of if you use SoftwareShield for licensing.

The added benefit for the SoftwareShield developer in this approach is that a disk clone will overwrite the entire disk, which also restores the registry. If you use this approach, then cloning a fresh image onto the disk (or partition) will also effectively clean your entire license - making an explicit "clean" unnecessary. We recommend Norton Ghost, available from Symantec for setting up your test machine (http://www.symantec.com/).

### Manually Cleaning A Test Machine

If you have decided not to use the disk imaging method of testing your software, or do not have access to a suitable package, then you will have to clean your test machine manually if it ever becomes necessary. This is not the preferred method.

The process is essentially :

1. Manually find and delete all the Hidden Alias Files, Registry Alias Files and Steganographic Alias Files (if any).

2. Manually find and delete the Virgin Registry Data (if any).

The Programming Notes File generated when you compiled the license forms a handy reference that you can print out and take to the test-machine to help you find and delete all the files and registry keys (if necessary).

When cleaning a test machine manually, you must delete any Steganographic Alias Files since you have no manual way of removing the licensing data from the image. Then, you must either manually restore an original copy of the bitmap, or let your installer program do it for you when you re-test the installation process.

Note: You should never install the SoftwareShield System DRM Kit on a test machine just so you can use the clean function in the License Manager. This would result in you introducing a possible dependency on the DRM Kit that your test process might miss.

### More Information

On the other hand, cleaning your development machine is quite simple. See Cleaning a Development Machine in this reference.